import {errorImgUrl} from '@/common/utils/config.js';
const loginConvert = {
	LoginResult: function(res){
		const {
			code: status,
			data:{
				userCode:id,
				mobile:mobile,
				nickname:nickname = '',
				portrait:portrait = errorImgUrl,
			},
			message:msg,
		} = res;
		return  {
			status: status,
			data: {
				id: id,
				mobile: mobile,
				nickname: nickname||mobile,
				portrait: portrait
			},
			msg: msg
		}
	}
}

export default loginConvert 